from . import Player

async def check_profile(event, ctx, args):
	pr = Player(event.get('from.id'))
	if pr.profile.file_data:
		return True
	else:
		await ctx.message(f'А вы кто?\n/g reg - зарегистировать профиль')

def check_params(data, model):
	for k, v in model.items():

		if isinstance(v, dict):
			data[k] = check_params(data.get(k, {}), model[k])

		if k not in data or not data[k]:
			data[k] = v

	return data
